package com.jiyun.user.controller;

import com.jiyun.common.pojo.user.Integral;
import com.jiyun.user.service.IntegralService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class IntegralController {

    @Autowired
    private IntegralService integralService;

    @GetMapping("integral/findIntegral/{token}")
    public Integral findIntegral(@PathVariable String token) {
        return integralService.findIntegral(token);
    }
}
